#include <iostream>
#include <vector>

using namespace std;

template <typename T>
void read(vector <T> &data) {
    int length;
    cin >> length;
    data.resize(length);
    for (int i = 0; i < length; ++i) {
        cin >> data[i];
    }
    return;
}

template <typename T>
void merge(T first_begin, T first_end, T second_begin, T second_end, T destination_begin, T destination_end) {
    T first = first_begin, second = second_begin, destination = destination_begin;
    while (1) {
        if (first == first_end && second == second_end)
            break;
        if (first == first_end) {
            *destination = *second;
            ++destination, ++second;
        } else if (second == second_end) {
            *destination = *first;
            ++destination, ++first;
        } else if (*first < *second) {
            *destination = *first;
            ++destination, ++first;
        } else {
            *destination = *second;
            ++destination, ++second;
        }
    }
    return;
}

template <typename T>
void copy(T begin, T end, T destination_begin, T destination_end) {
    T current = begin, destination = destination_begin;
    while (current != end) {
        *destination = *current;
        ++destination, ++current;
    }
    return;
}

template <typename T>
void sort(T begin, T end, T bufer_begin, T bufer_end) {
    if (end - begin <= 1) {
        return;
    }
    sort(begin, begin + (end - begin) / 2, bufer_begin, bufer_begin + (bufer_end - bufer_begin) / 2);
    sort(begin + (end - begin) / 2, end, bufer_begin + (bufer_end - bufer_begin) / 2, bufer_end);
    merge(begin, begin + (end - begin) / 2, begin + (end - begin) / 2, end, bufer_begin, bufer_end);
    copy(bufer_begin, bufer_end, begin, end);
}

template <typename T>
void print(vector <T> &data) {
    for (int i = 0; i < data.size(); ++i) {
        cout << data[i] << ' ';
    }
    return;
}

int main() {
    vector <int> data;
    read(data);
    vector <int> bufer(data.size());
    sort(data.begin(), data.end(), bufer.begin(), bufer.end());
    print(data);
}